<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //Math.round()四舍五入操作
    var result1=Math.round(1.3);
    console.log(result1);
    var num=2.16;
    num=num*10;
    var result2=Math.round(num);
    result2=result2/10;
    console.log(result2);
    //向下取整Math.floor() 向上取整Math.ceil()
    var result3=Math.floor(1.6);
    var result4=Math.ceil(1.3);
    console.log(result3,result4);
</script>
</html>